3.1.16 \(\int \frac {1}{a x^2+b x^3+c x^4} \, dx\)

Optimal. Leaf size=81 \[ -\frac {\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^2 \sqrt {b^2-4 a c}}+\frac {b \log \left (a+b x+c x^2\right )}{2 a^2}-\frac {b \log (x)}{a^2}-\frac {1}{a x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.10, antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.389, Rules used = {1594, 709, 800, 634, 618, 206, 628} \begin {gather*} -\frac {\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^2 \sqrt {b^2-4 a c}}+\frac {b \log \left (a+b x+c x^2\right )}{2 a^2}-\frac {b \log (x)}{a^2}-\frac {1}{a x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a*x^2 + b*x^3 + c*x^4)^(-1),x]

[Out]

-(1/(a*x)) - ((b^2 - 2*a*c)*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/(a^2*Sqrt[b^2 - 4*a*c]) - (b*Log[x])/a^2 +
 (b*Log[a + b*x + c*x^2])/(2*a^2)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 709

Int[((d_.) + (e_.)*(x_))^(m_)/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(e*(d + e*x)^(m + 1))/((m
 + 1)*(c*d^2 - b*d*e + a*e^2)), x] + Dist[1/(c*d^2 - b*d*e + a*e^2), Int[((d + e*x)^(m + 1)*Simp[c*d - b*e - c
*e*x, x])/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && LtQ[m, -1]

Rule 800

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[((d + e*x)^m*(f + g*x))/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[m]

Rule 1594

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rubi steps

\begin {align*} \int \frac {1}{a x^2+b x^3+c x^4} \, dx &=\int \frac {1}{x^2 \left (a+b x+c x^2\right )} \, dx\\ &=-\frac {1}{a x}+\frac {\int \frac {-b-c x}{x \left (a+b x+c x^2\right )} \, dx}{a}\\ &=-\frac {1}{a x}+\frac {\int \left (-\frac {b}{a x}+\frac {b^2-a c+b c x}{a \left (a+b x+c x^2\right )}\right ) \, dx}{a}\\ &=-\frac {1}{a x}-\frac {b \log (x)}{a^2}+\frac {\int \frac {b^2-a c+b c x}{a+b x+c x^2} \, dx}{a^2}\\ &=-\frac {1}{a x}-\frac {b \log (x)}{a^2}+\frac {b \int \frac {b+2 c x}{a+b x+c x^2} \, dx}{2 a^2}+\frac {\left (b^2-2 a c\right ) \int \frac {1}{a+b x+c x^2} \, dx}{2 a^2}\\ &=-\frac {1}{a x}-\frac {b \log (x)}{a^2}+\frac {b \log \left (a+b x+c x^2\right )}{2 a^2}-\frac {\left (b^2-2 a c\right ) \operatorname {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{a^2}\\ &=-\frac {1}{a x}-\frac {\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{a^2 \sqrt {b^2-4 a c}}-\frac {b \log (x)}{a^2}+\frac {b \log \left (a+b x+c x^2\right )}{2 a^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 77, normalized size = 0.95 \begin {gather*} \frac {\frac {2 \left (b^2-2 a c\right ) \tan ^{-1}\left (\frac {b+2 c x}{\sqrt {4 a c-b^2}}\right )}{\sqrt {4 a c-b^2}}+b \log (a+x (b+c x))-\frac {2 a}{x}-2 b \log (x)}{2 a^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a*x^2 + b*x^3 + c*x^4)^(-1),x]

[Out]

((-2*a)/x + (2*(b^2 - 2*a*c)*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]])/Sqrt[-b^2 + 4*a*c] - 2*b*Log[x] + b*Log[a
 + x*(b + c*x)])/(2*a^2)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{a x^2+b x^3+c x^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(a*x^2 + b*x^3 + c*x^4)^(-1),x]

[Out]

IntegrateAlgebraic[(a*x^2 + b*x^3 + c*x^4)^(-1), x]

________________________________________________________________________________________

fricas [A]  time = 1.04, size = 269, normalized size = 3.32 \begin {gather*} \left [-\frac {{\left (b^{2} - 2 \, a c\right )} \sqrt {b^{2} - 4 \, a c} x \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c + \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + 2 \, a b^{2} - 8 \, a^{2} c - {\left (b^{3} - 4 \, a b c\right )} x \log \left (c x^{2} + b x + a\right ) + 2 \, {\left (b^{3} - 4 \, a b c\right )} x \log \relax (x)}{2 \, {\left (a^{2} b^{2} - 4 \, a^{3} c\right )} x}, -\frac {2 \, {\left (b^{2} - 2 \, a c\right )} \sqrt {-b^{2} + 4 \, a c} x \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + 2 \, a b^{2} - 8 \, a^{2} c - {\left (b^{3} - 4 \, a b c\right )} x \log \left (c x^{2} + b x + a\right ) + 2 \, {\left (b^{3} - 4 \, a b c\right )} x \log \relax (x)}{2 \, {\left (a^{2} b^{2} - 4 \, a^{3} c\right )} x}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(c*x^4+b*x^3+a*x^2),x, algorithm="fricas")

[Out]

[-1/2*((b^2 - 2*a*c)*sqrt(b^2 - 4*a*c)*x*log((2*c^2*x^2 + 2*b*c*x + b^2 - 2*a*c + sqrt(b^2 - 4*a*c)*(2*c*x + b
))/(c*x^2 + b*x + a)) + 2*a*b^2 - 8*a^2*c - (b^3 - 4*a*b*c)*x*log(c*x^2 + b*x + a) + 2*(b^3 - 4*a*b*c)*x*log(x
))/((a^2*b^2 - 4*a^3*c)*x), -1/2*(2*(b^2 - 2*a*c)*sqrt(-b^2 + 4*a*c)*x*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)/
(b^2 - 4*a*c)) + 2*a*b^2 - 8*a^2*c - (b^3 - 4*a*b*c)*x*log(c*x^2 + b*x + a) + 2*(b^3 - 4*a*b*c)*x*log(x))/((a^
2*b^2 - 4*a^3*c)*x)]

________________________________________________________________________________________

giac [A]  time = 0.33, size = 79, normalized size = 0.98 \begin {gather*} \frac {b \log \left (c x^{2} + b x + a\right )}{2 \, a^{2}} - \frac {b \log \left ({\left | x \right |}\right )}{a^{2}} + \frac {{\left (b^{2} - 2 \, a c\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{\sqrt {-b^{2} + 4 \, a c} a^{2}} - \frac {1}{a x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(c*x^4+b*x^3+a*x^2),x, algorithm="giac")

[Out]

1/2*b*log(c*x^2 + b*x + a)/a^2 - b*log(abs(x))/a^2 + (b^2 - 2*a*c)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/(sqr
t(-b^2 + 4*a*c)*a^2) - 1/(a*x)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 112, normalized size = 1.38 \begin {gather*} -\frac {2 c \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, a}+\frac {b^{2} \arctan \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}\, a^{2}}-\frac {b \ln \relax (x )}{a^{2}}+\frac {b \ln \left (c \,x^{2}+b x +a \right )}{2 a^{2}}-\frac {1}{a x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(c*x^4+b*x^3+a*x^2),x)

[Out]

-1/a/x-1/a^2*b*ln(x)+1/2/a^2*b*ln(c*x^2+b*x+a)-2/a/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*c+1/a
^2/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b^2

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(c*x^4+b*x^3+a*x^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` f
or more details)Is 4*a*c-b^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 2.50, size = 339, normalized size = 4.19 \begin {gather*} \frac {\ln \left (2\,a\,b^3+2\,b^4\,x-2\,a\,b^2\,\sqrt {b^2-4\,a\,c}+a^2\,c\,\sqrt {b^2-4\,a\,c}-2\,b^3\,x\,\sqrt {b^2-4\,a\,c}+2\,a^2\,c^2\,x-7\,a^2\,b\,c-8\,a\,b^2\,c\,x+4\,a\,b\,c\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (a\,\left (2\,b\,c-c\,\sqrt {b^2-4\,a\,c}\right )-\frac {b^3}{2}+\frac {b^2\,\sqrt {b^2-4\,a\,c}}{2}\right )}{4\,a^3\,c-a^2\,b^2}-\frac {1}{a\,x}-\frac {\ln \left (2\,a\,b^3+2\,b^4\,x+2\,a\,b^2\,\sqrt {b^2-4\,a\,c}-a^2\,c\,\sqrt {b^2-4\,a\,c}+2\,b^3\,x\,\sqrt {b^2-4\,a\,c}+2\,a^2\,c^2\,x-7\,a^2\,b\,c-8\,a\,b^2\,c\,x-4\,a\,b\,c\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (\frac {b^3}{2}-a\,\left (2\,b\,c+c\,\sqrt {b^2-4\,a\,c}\right )+\frac {b^2\,\sqrt {b^2-4\,a\,c}}{2}\right )}{4\,a^3\,c-a^2\,b^2}-\frac {b\,\ln \relax (x)}{a^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a*x^2 + b*x^3 + c*x^4),x)

[Out]

(log(2*a*b^3 + 2*b^4*x - 2*a*b^2*(b^2 - 4*a*c)^(1/2) + a^2*c*(b^2 - 4*a*c)^(1/2) - 2*b^3*x*(b^2 - 4*a*c)^(1/2)
 + 2*a^2*c^2*x - 7*a^2*b*c - 8*a*b^2*c*x + 4*a*b*c*x*(b^2 - 4*a*c)^(1/2))*(a*(2*b*c - c*(b^2 - 4*a*c)^(1/2)) -
 b^3/2 + (b^2*(b^2 - 4*a*c)^(1/2))/2))/(4*a^3*c - a^2*b^2) - 1/(a*x) - (log(2*a*b^3 + 2*b^4*x + 2*a*b^2*(b^2 -
 4*a*c)^(1/2) - a^2*c*(b^2 - 4*a*c)^(1/2) + 2*b^3*x*(b^2 - 4*a*c)^(1/2) + 2*a^2*c^2*x - 7*a^2*b*c - 8*a*b^2*c*
x - 4*a*b*c*x*(b^2 - 4*a*c)^(1/2))*(b^3/2 - a*(2*b*c + c*(b^2 - 4*a*c)^(1/2)) + (b^2*(b^2 - 4*a*c)^(1/2))/2))/
(4*a^3*c - a^2*b^2) - (b*log(x))/a^2

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(c*x**4+b*x**3+a*x**2),x)

[Out]

Timed out

________________________________________________________________________________________